<!--
Equation Editor plugin for HTMLArea v3.0

brought to you by the Center for Distributed Learning <http://www.cdlonline.org>
a division of the Butte County Office of Education.

Working sample can be found at
	http://www.cdlonline.org/works/wysiwyg/examples/eq.html

Questions? Suggestions? email us... webmaster@cdlonline.org

Last Modified : 2004-09-22 19:15:16
-->

<html>
<head>
  <title>Equation</title>
  <link rel="stylesheet" type="text/css" href="../../../popups/popup.css" />
  <script type="text/javascript" src="../../../popups/popup.js"></script>

<script type="text/javascript">
function Init() {
  window.resizeTo(190, 225);
  __dlg_translate('Equation');
  __dlg_init();
  var selected_op="none";
  document.getElementById("cancel").focus();
}

function SelectOperation(sop,sop_name) {
   document.getElementById('less_equal').style.backgroundColor='ButtonFace';
   document.getElementById('greater_egual').style.backgroundColor='ButtonFace';
   document.getElementById('notequal').style.backgroundColor='ButtonFace';
   document.getElementById('square_root').style.backgroundColor='ButtonFace';
   document.getElementById('divide').style.backgroundColor='ButtonFace';
   document.getElementById('mul').style.backgroundColor='ButtonFace';
   document.getElementById('parenthesis').style.backgroundColor='ButtonFace';
   document.getElementById('hor_fraction').style.backgroundColor='ButtonFace';
   document.getElementById('diag_fraction').style.backgroundColor='ButtonFace';
   document.getElementById('abs_value').style.backgroundColor='ButtonFace';
   document.getElementById('root').style.backgroundColor='ButtonFace';
   sop.style.backgroundColor='blue';
   selected_op=sop_name;
}

function onOK() {
  var param = {};
  param['op']=selected_op;
  __dlg_close(param);
  return false;
}

function onCancel() {
  __dlg_close(null);
  return false;
}
</script>
</head>

<body class="dialog" onload="Init()">
<div class="title">Select operation</div>
<table align="center" border="1" cellpadding="2" cellspacing="0">
  <tr>
    <td id="less_equal" align="center" onclick="SelectOperation(this,'less_equal')"><span><img src="../img/less_equal_than.gif"></span></td>
    <td id="greater_egual" align="center" onclick="SelectOperation(this,'greater_egual')"><span><img src="../img/greater_equal_than.gif"></span></td>
    <td id="notequal" align="center" onclick="SelectOperation(this,'notequal')"><span><img src="../img/notequal.gif"></span></td>
  </tr>
  <tr>
    <td id="square_root" align="center" onclick="SelectOperation(this,'square_root')"><span><img src="../img/square_root.gif"></span></td>
    <td id="root" align="center" onclick="SelectOperation(this,'root')"><span><img src="../img/root.gif"></span></td>
    <td id="parenthesis" align="center" onclick="SelectOperation(this,'parenthesis')"><span><img src="../img/parenthesis.gif"></span></td>
  </tr>
  <tr>
    <td id="hor_fraction" align="center" onclick="SelectOperation(this,'hor_fraction')"><span><img src="../img/hor_fraction.gif"></span></td>
    <td id="diag_fraction" align="center" onclick="SelectOperation(this,'diag_fraction')"><span><img src="../img/diag_fraction.gif"></span></td>
    <td id="abs_value" align="center" onclick="SelectOperation(this,'abs_value')"><span><img src="../img/abs_value.gif"></span></td>
  </tr>
  <tr>
    <td id="divide" align="center" onclick="SelectOperation(this,'divide')"><span><img src="../img/divide.gif"></span></td>
    <td id="mul" align="center" onclick="SelectOperation(this,'mul')"><span><img src="../img/mul.gif"></span></td>
    <td ><span>&nbsp;</span></td>
  </tr>
</table>
<div id="buttons">
  <button type="button" name="ok" onclick="return onOK();"><span>Insert</span></button>
  <button type="button" name="cancel" id="cancel" onclick="return onCancel();"><span>Cancel</span></button>
</div>
</body>
</html>